package ouyangye.student;

public class Main {
    public static void main(String[] args) {
        StudentG g1=new StudentG("张三","G01",true,80);
        StudentG g2=new StudentG("张四","G02",true,90);
        StudentG g3=new StudentG("张五","G03",false,88);

        StudentM m1=new StudentM("李四","M01",true,1);
        StudentM m2=new StudentM("李五","M02",true,3);

        Student[] students={g1,g2,g3,m1,m2};

        System.out.println("优秀的学生：");
        for(Student student:students){
            if(student.isExcellent()){
                student.printInfo();
            }
        }

    }
}
